package ochart.events
{
	import flash.events.DataEvent;
	import flash.events.Event;
	import flash.events.ProgressEvent;
	
	public class DataEvent extends ProgressEvent
	{
		public static const DATA:String = "data";
		public static const PROGRESS:String = "progress";
		public static const ERROR:String = "error";
		
		public var data:Object = null;
		public var error:String = null;
		
		public function DataEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
		
		override public function clone():Event
		{
			var dataEvent:DataEvent = new ochart.events.DataEvent(type);
			dataEvent.data = data;
			dataEvent.error = error;
			return dataEvent;
		}
	}
}